package pattern24.people;

import java.util.ArrayList;
import java.util.List;

/**
 * 面向对象的思想写的男人女人的区别
 *
 * @author wdl
 */
public class People {
    public static void main(String[] args) {
        List<BasePerson> personList = new ArrayList<>();

        BasePerson man1 = new Man();
        man1.action = "成功";
        personList.add(man1);

        BasePerson woman1 = new Woman();
        woman1.action = "成功";
        personList.add(woman1);

        BasePerson man2 = new Man();
        man2.action = "失败";
        personList.add(man2);

        BasePerson woman2 = new Woman();
        woman2.action = "失败";
        personList.add(woman2);

        BasePerson man3 = new Man();
        man3.action = "恋爱";
        personList.add(man3);

        BasePerson woman3 = new Woman();
        woman3.action = "恋爱";
        personList.add(woman3);

        for (BasePerson person :
                personList) {
            person.getConclusion();
        }
    }
}
